<template>
  <div id="check"></div>
</template>
<script>
export default {
  data() {
    return {};
  },
  activated() {
    this.getFirst();
  },
  methods: {
    getFirst() {
      let urls = "plugin.activity-ranking.frontend.quota.check-prep";
      $http
        .get(urls, {}, "生成中")
        .then(response => {
          if (response.result === 1) {
            if (response.data.page) {
              window.location.href = response.data.page;
            }
          } else {
            this.$dialog
              .alert({
                message: response.msg
              })
              .then(() => {
                this.$router.push(this.fun.getUrl("home", {}));
              });
          }
        })
        .catch(error => {
          console.log(error);
        });
    }
  }
};
</script>
<style lang="sass" scoped>
</style>